package org.example.observerPattern;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 具体观察者
 */
public class ConcreteObserver implements Observer{

    private static final Logger LOGGER = LoggerFactory.getLogger(ConcreteObserver.class);

    private String localState;

    @Override
    public void update(String newState) {
        this.localState = newState;
        LOGGER.info("本地状态更新：{}", newState);
    }
}
